Page({
  data:{
     markers: [{
      iconPath: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1494237809569&di=972d8780264d2a45f641483165059901&imgtype=0&src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F01d89956f0bc226ac7257d20b5f151.jpg",
      id: 0,
      latitude: 23.099994,
      longitude: 113.324520,
      width: 50,
      height: 50
    },{
      iconPath: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1494237809569&di=972d8780264d2a45f641483165059901&imgtype=0&src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F01d89956f0bc226ac7257d20b5f151.jpg",
      id: 0,
      latitude: 29.899994,
      longitude: 114.624520,
      width: 50,
      height: 50
    }],
    shopL:{}
  },
  onLoad:function(e){
    var lng = e.currtentTarget.dataset.lng;
    var lat = e.currtentTarget.dataset.lat;
    this.setData({ shopL: { lat: lat, lng:lng}})
  },
  onReady: function (e) {
    // 使用 wx.createMapContext 获取 map 上下文 
    this.mapCtx = wx.createMapContext('myMap');
  },
  moveToLocation: function () {
    wx.getLocation()
    this.mapCtx.moveToLocation()
  },
})